package com.fy.feign.controller;

import com.fy.feign.feign.Feign;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignClientController {

    @Autowired
    private Feign feign;

    @GetMapping(value = "/echo/{name}")
    @Trace
    public String echo(@PathVariable String name) {
        return feign.echo(name);
    }
}